package com.example.springmvc250513.controller;

import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class HelloController {
    //建立连接
    @RequestMapping(value = "/print1",method = RequestMethod.GET)
    public String print1(){
        return "hello print1";
    }

    @GetMapping("/print2")
    public String print2(){
        return "hello print2";
    }

    @RequestMapping(value = "/print3",method = RequestMethod.POST)
    public String print3(){
        return "hello print3";
    }

    @PostMapping ("/print4")
    public String print4(){
        return "hello print4";
    }
}
